Class sjl.Not2
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sjl.Not2

java.lang.Object
   |
   +----sjl.Not2

public class Not2
extends Object
implements Predicate2
A predicate adapter. The Not2 class can wrap a Predicate2 class so that the truth value is reversed.
    Algo.sort(vector.begin(), vector.end(), new Not2(new PredLessInteger()));
The above example will sort a vector of Integers in reverse.

Copyright © 1996 Finn Bock


Constructor Index

 o Not2(Predicate2)
Specified the predicate to use.

Method Index

 o compare(Object, Object)
Negate the thruth value of the predicate.

Constructors

 o Not2
  public Not2(Predicate2 pred)
Specified the predicate to use.

Methods

 o compare
  public boolean compare(Object o1,
                         Object o2)
Negate the thruth value of the predicate. The predicate is specified when the adapter is constructed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index